<ion-view view-title="蓝牙设置">

  <ion-nav-bar class="item-customer-bg-darkred" align-title="center">
    <ion-nav-back-button class="button-clear">
      <i class="ion-arrow-left-c font_arrow"></i>
    </ion-nav-back-button>
    <!--<ion-nav-buttons side="right">-->
    <!--<button class="button button-clear icon ion-android-more-vertical"></button>-->
    <!--</ion-nav-buttons>-->
  </ion-nav-bar>

  <ion-content class="padding">

    <button class="button button-block button-positive" ng-click="isEnabled()">
      检测手机蓝牙状态
    </button>
    <button class="button button-block button-positive" ng-click="searchBlueToothDevices()">
      搜索蓝牙设备
    </button>
    <!--<button class="button button-block button-positive" ng-click="writeImsi()">-->
    <!--写卡测试-->
    <!--</button>-->
    <!--<button class="button button-block button-positive" ng-click="writeSMSC()">-->
    <!--写短信中心测试-->
    <!--</button>-->
    <!--<button class="button button-block button-positive" ng-click="readInfo()">-->
    <!--读卡测试-->
    <!--</button>-->
    <!--<button class="button button-block button-positive" ng-click="readInfo()">-->
    <!--读取身份证-->
    <!--</button>-->
    <!--<button class="button button-block button-positive" ng-click="showDate()">-->
    <!--日历-->
    <!--</button>-->
    <!--<button class="button button-block button-positive" ng-click="readSim()">-->
    <!--读iccid-->
    <!--</button>-->

    <p>手机蓝牙状态：{{bluetoothStatus}}</p>
    <p>默认蓝牙读卡器：{{defaultDevice.name}} - {{defaultDevice.mac}}</p>

    <!--<ion-list>-->
    <!--<ion-item class="item-remove-animate item-avatar item-icon-right" ng-repeat="bluetoothdevice in bluetoothdevices" type="item-text-wrap" href="#bluetooth/{{bluetoothdevice.address}}">-->
    <!--<p>{{bluetoothdevice.name}}</p>-->
    <!--&lt;!&ndash;<p>{{bluetoothdevice.class}}</p>&ndash;&gt;-->
    <!--&lt;!&ndash;<p>{{bluetoothdevice.id}}</p>&ndash;&gt;-->
    <!--<p>{{bluetoothdevice.address}}</p>-->
    <!--<p>{{bluetoothdevice.paired}}</p>-->
    <!--</ion-item>-->
    <!--</ion-list>-->

    <div class="list">
      <label class="item item-radio" ng-repeat="bluetoothdevice in bluetoothdevices" ng-click="setDefaultDevice('{{bluetoothdevice.name}}', '{{bluetoothdevice.address}}')">
        <input type="radio" name="group" value="go" ng-checked="defaultDevice.name==bluetoothdevice.name">
        <div class="item-content">
          {{bluetoothdevice.name}}：{{bluetoothdevice.address}}
        </div>
        <i class="radio-icon ion-checkmark"></i>
      </label>
    </div>

  </ion-content>
</ion-view>
